

#include "ROB_Telemetry.h"


void CTelemetry::Begin(void) {

  // packet header
  tmy.cmd = (byte)ID_TELEMETRY;

  // Sensor initilaizer
  tmy.engineLSpeed = 0;
  tmy.engineRSpeed = 0;
  tmy.servoPanPos = 90;
  tmy.servoTiltPos = 90;
  tmy.ir1Distance = 0;
  tmy.ir2Distance = 0;
  tmy.ir3Distance = 0;
  tmy.ir4Distance = 0;
  tmy.ir5Distance = 0;
  tmy.irMaxDistance = 0;
  tmy.pingDistance = 0;
  tmy.batteryStatus = 0;
  tmy.btnStatus = 0;
  tmy.load = 0;

  // Actor preset

  tmy.actorEnablers = (1<< TMY_ENA_DN) | (1<< TMY_ENA_IRBAR) | (1<< TMY_ENA_PING);
  tmy.engineLPower = 0;
  tmy.engineRPower = 0;
  tmy.engineDirections =  0;
  tmy.servoTiltTargetPos = 90;
  tmy.servoPanTargetPos = 90;
  tmy.btnCZHandler = 0;
  tmy.lightSystem = 0;

  // commanders initializer
  tmy.mocsTurn = 0;
  tmy.mocsDriveSec = 0;
  tmy.soundPlay = 1;
}



void CTelemetry::save(void) {
}



void CTelemetry::load(void) {
}



struTelemetry tmy;
CTelemetry Telemetry;

